#ifndef RIGHTFORM_H
#define RIGHTFORM_H

#include "listform.h"
#include "qlistwidget.h"
#include "qmediaplaylist.h"
#include <QWidget>


namespace Ui {
class rightForm;
}

class rightForm : public QWidget
{
    Q_OBJECT
public:
    explicit rightForm(QWidget *parent = nullptr);
    ~rightForm();

    //初始化界面设置
    void setPageText(QString text);
    //页面类别
    void setPageType(Page Page);
    //添加项到页面
    void addToRightPage(listForm musiclist);
    //显示到页面
    void showItemonPage(listForm musiclist);

    void setMusicListPage(Page Pagetype);
    QString getMusicId(int index);
    //添加到播放列表
    void addMusicToPlayList(listForm list, QMediaPlaylist *playlist);


signals:
    void upDatePage(bool isLike, QString itemid);
    void playMusicByIndex(rightForm* sender,int row);
    void play(Page type);
    void musicFilesSelected(listForm& musicList);

private slots:
    void on_pushButton_2_clicked();

private:
    Ui::rightForm *ui;
    listForm musiclist;
    Page Pagetype;
    QVector<QString> musicPage;
    bool isLike;
    std::vector<QString> itemid;
};

#endif // RIGHTFORM_H
